var express = require("express");
var router = express.Router();
var mongoose = require("mongoose");
var Goods = require("../models/goods");

//连接monogoDB数据库
mongoose.connect("mongodb://127.0.0.127017/dumall");

mongoose.connection.on("connected",function(){
    console.log("MongoDB success");
});

mongoose.connection.on("disconnected",function(){
    console.log("MongoDB error");
});

router.get("/",function(req,res,next){
    res.send("hello,goods list");
});

module.exports = router;